RTOS添加静态库

Version 1.0


1. 概述

用户开发时经常需要引入外部编译的静态库,一般添加路径在:rtk/proj/libs/algo/pioneer3/9.1.0/

2. 添加方法

以新加一个APC算法库为例,需要做如下修改。

  1. 添加头文件

    将依赖的头文件AudioSRCProcess.h放到rtk/proj/hdrs/xxx下面,xxx指product config,例如使用pioneer3_ssc020a_64_freertos_smp_isw_usbdev这个config,那么头文件添加路径可放在rtk/proj/hdrs/pioneer3_ssc020a_64_freertos_smp_isw_usbdev/

  2. 添加lib库

    libAPC_RTOS.a放到 rtk/proj/libs/algo/pioneer3/9.1.0/libAPC_RTOS.a

  3. 加入编译

    1. rtk/proj/mak/common/libs_prebuild.mak中加入:

      ifeq ($(BB_CHIP_ID),pioneer3)
      LINK += $(LIBS_DIR_FOR_ALGO)libAPC_RTOS.a\
      endif
      
    2. 在.c中包含头文件即可调用相应函数

    3. 使用make clean; make;命令进行编译